{% extends "kbforums/base.html" %}
{% from "kbforums/includes/macros.html" import kbforums_warning with context %}
{# L10n: {t} is the title of the thread. {d} is the name of the document. #}
{% set title = _('Delete Thread | {t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %}
{% set crumbs = [(document.get_absolute_url(), document.title),
                 (url('wiki.discuss.threads', document.slug), _('Discuss')),
                 (url('wiki.discuss.posts', document.slug, thread.id), thread.title),
                 (None, _('Delete Thread'))] %}

{% block content %}
<div class="grid_9">
<article id="confirm-delete" class="main">
  {{ kbforums_warning(document, user) }}
  <h1>{{ _('Are you sure you want to delete this thread?') }}</h1>
  <div class="thread-to-delete">
    <label>{{ _('Title') }}</label>
    <div class="content">{{ thread.title }}</div>
    <label>{{ _('Creator') }}</label>
    <div>{{ display_name(thread.creator) }}</div>
    <label>{{ _('Date') }}</label>
    <div>{{ datetimeformat(thread.created, format='longdatetime') }}</div>
    <label>{{ _('Number of Replies') }}</label>
    <div>{{ thread.replies }}</div>

    <form action="{{ url('wiki.discuss.delete_thread', document.slug, thread.id) }}" method="post">
      {% csrf_token %}
      <p>
        {{ _('You are about to permanently delete this thread. <strong>This cannot be undone!</strong> Are you sure you want to continue?')|safe }}
      </p>
      <input type="submit" value="{{ _('Delete') }}" />
      <a href="{{ url('wiki.discuss.posts', document.slug, thread.id) }}">{{ _('Cancel') }}</a>
    </form>
  </div>
</article>
</div>
{% endblock %}
